﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using SportStore.Models.Entities;

namespace SportStore.Framework
{
    public static class SessionManager
    {
        public static User User()
        {
            User guest = new User();
            return (User)HttpContext.Current.Session["user"]??guest;
        }

        public static User User(User user)
        {
            HttpContext.Current.Session["user"] = user;
            return (User)HttpContext.Current.Session["user"];
        }
    }
}